class CreateImages < ActiveRecord::Migration
  def self.up
    create_table :images do |t|
      t.column :description, :longtext
      t.column :title, :string
      t.column :user_id, :integer
      t.column :rating, :integer, :default => 0
      t.column :deleted_reason, :text
      t.column :deleted_by, :integer, :references => :users
      t.column :deleted_at, :datetime
      t.column :purged_at, :datetime
      t.column :created_at, :datetime
      t.column :updated_at, :datetime
    end
  end

  def self.down
    drop_table :images
  end
end
